package modelo;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import java.sql.*;
/**
 *
 * @author ElDiego
 */
public class Conexion {
    
    public Connection conexion;
    public Statement sentencia;
    public ResultSet tablaResultado;

    public Conexion(String server,String bd, String user,String pass)
            throws SQLException{ 
        
        MysqlDataSource mysql = new MysqlDataSource();
        mysql.setServerName(server);
        mysql.setDatabaseName(bd);
        mysql.setUser(user);
        mysql.setPassword(pass);
        
        conexion=mysql.getConnection();
        
    }
    
    
}
